<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Tetris Game: CGridSceneNode Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Tetris Game
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">Test game project created via Irrlicht and Qt</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('class_c_grid_scene_node.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">CGridSceneNode Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<!-- doxytag: class="CGridSceneNode" -->
<p>Grid scene node.  
 <a href="class_c_grid_scene_node.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_c_grid_scene_node_8h_source.html">CGridSceneNode.h</a>&gt;</code></p>

<p><a href="class_c_grid_scene_node-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_c_grid_scene_node_1_1_s_grid.html">SGrid</a></td></tr>
<tr><td colspan="2"><h2><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><b>EAlign</b> { <b>CENTER</b>, 
<b>MIN_X_MIN_Y</b>
 }</td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1c98390516247497fd3b672ec3379a05"></a><!-- doxytag: member="CGridSceneNode::CGridSceneNode" ref="a1c98390516247497fd3b672ec3379a05" args="(irr::scene::ISceneNode *parent, irr::scene::ISceneManager *smgr, irr::s32 id=&#45;1, irr::u32 numGrids=1)" -->
&#160;</td><td class="memItemRight" valign="bottom"><b>CGridSceneNode</b> (irr::scene::ISceneNode *parent, irr::scene::ISceneManager *smgr, irr::s32 id=-1, irr::u32 numGrids=1)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab04ec6ab610b46a5b06c8ee7710f4199"></a><!-- doxytag: member="CGridSceneNode::clone" ref="ab04ec6ab610b46a5b06c8ee7710f4199" args="(irr::scene::ISceneNode *newParent=0, irr::scene::ISceneManager *newSceneManager=0)" -->
virtual <a class="el" href="class_c_grid_scene_node.html">CGridSceneNode</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_scene_node.html#ab04ec6ab610b46a5b06c8ee7710f4199">clone</a> (irr::scene::ISceneNode *newParent=0, irr::scene::ISceneManager *newSceneManager=0)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Will create a copy of this scenenode and it's settings. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8d2ca45e674d21ad8c9579eb4f919316"></a><!-- doxytag: member="CGridSceneNode::OnRegisterSceneNode" ref="a8d2ca45e674d21ad8c9579eb4f919316" args="()" -->
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_scene_node.html#a8d2ca45e674d21ad8c9579eb4f919316">OnRegisterSceneNode</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Pre-Register stuff. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5e4bce549fa663df8031943ce4bf4efd"></a><!-- doxytag: member="CGridSceneNode::render" ref="a5e4bce549fa663df8031943ce4bf4efd" args="()" -->
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_scene_node.html#a5e4bce549fa663df8031943ce4bf4efd">render</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Render our grid using 3D lines stored inside the internal meshbuffer. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9478db4fc40b9a11bb36611d042c609c"></a><!-- doxytag: member="CGridSceneNode::getBoundingBox" ref="a9478db4fc40b9a11bb36611d042c609c" args="() const " -->
virtual const <br class="typebreak"/>
irr::core::aabbox3d&lt; irr::f32 &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_scene_node.html#a9478db4fc40b9a11bb36611d042c609c">getBoundingBox</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns our bounding box. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a12ce659d60c72140d15a8f2e6b718ba9"></a><!-- doxytag: member="CGridSceneNode::getMaterialCount" ref="a12ce659d60c72140d15a8f2e6b718ba9" args="() const " -->
virtual irr::u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_scene_node.html#a12ce659d60c72140d15a8f2e6b718ba9">getMaterialCount</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the total number of materials (identical to number of grids) <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2dd56ea1de346fb2c6a1d0e4b9bad865"></a><!-- doxytag: member="CGridSceneNode::getMaterial" ref="a2dd56ea1de346fb2c6a1d0e4b9bad865" args="(irr::u32 i)" -->
virtual irr::video::SMaterial &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_scene_node.html#a2dd56ea1de346fb2c6a1d0e4b9bad865">getMaterial</a> (irr::u32 i)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the only material. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a21d988baa4b17c8329fb90aa2035aa5f"></a><!-- doxytag: member="CGridSceneNode::getNumberOfGrids" ref="a21d988baa4b17c8329fb90aa2035aa5f" args="() const " -->
irr::u32&#160;</td><td class="memItemRight" valign="bottom"><b>getNumberOfGrids</b> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4456ba2421e76818089bd86e4a181bdf"></a><!-- doxytag: member="CGridSceneNode::addGrid" ref="a4456ba2421e76818089bd86e4a181bdf" args="()" -->
irr::u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_scene_node.html#a4456ba2421e76818089bd86e4a181bdf">addGrid</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">add a new grid and return it's index <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3b533c927ebc3bf5dd134753aeae6411"></a><!-- doxytag: member="CGridSceneNode::removeGrid" ref="a3b533c927ebc3bf5dd134753aeae6411" args="(irr::u32 index)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_scene_node.html#a3b533c927ebc3bf5dd134753aeae6411">removeGrid</a> (irr::u32 index)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">remove an existing grid <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7a14e136167174fb0ddf17396efa85c1"></a><!-- doxytag: member="CGridSceneNode::getGrid" ref="a7a14e136167174fb0ddf17396efa85c1" args="(irr::u32 index)" -->
<a class="el" href="struct_c_grid_scene_node_1_1_s_grid.html">SGrid</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_scene_node.html#a7a14e136167174fb0ddf17396efa85c1">getGrid</a> (irr::u32 index)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">access a grid <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a31779633f7cbd5af409c9a47f770d7b2"></a><!-- doxytag: member="CGridSceneNode::getGrid" ref="a31779633f7cbd5af409c9a47f770d7b2" args="(irr::u32 index) const " -->
const <a class="el" href="struct_c_grid_scene_node_1_1_s_grid.html">SGrid</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_scene_node.html#a31779633f7cbd5af409c9a47f770d7b2">getGrid</a> (irr::u32 index) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">access a grid <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a006ea5e013f822946bfafe2a0e40a19a"></a><!-- doxytag: member="CGridSceneNode::setGridsSize" ref="a006ea5e013f822946bfafe2a0e40a19a" args="(const irr::core::dimension2df &amp;newsize)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_scene_node.html#a006ea5e013f822946bfafe2a0e40a19a">setGridsSize</a> (const irr::core::dimension2df &amp;newsize)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the size for all grids. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const irr::core::dimension2df &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_scene_node.html#a313da68bcea2307b1b79df673583f8df">getGridsSize</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5facc9b783608f8ec2c0f593cb5f5d53"></a><!-- doxytag: member="CGridSceneNode::showSelectionOnce" ref="a5facc9b783608f8ec2c0f593cb5f5d53" args="()" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_scene_node.html#a5facc9b783608f8ec2c0f593cb5f5d53">showSelectionOnce</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">For debugging: show the selection buffer on next render. <br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae571cbe41eefb35e8cbe168ed8e90322"></a><!-- doxytag: member="CGridSceneNode::hasDirtyBoundingBox" ref="ae571cbe41eefb35e8cbe168ed8e90322" args="() const " -->
bool&#160;</td><td class="memItemRight" valign="bottom"><b>hasDirtyBoundingBox</b> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af8e73090db3d3e605b2c398a9900516b"></a><!-- doxytag: member="CGridSceneNode::hasDirtyGrid" ref="af8e73090db3d3e605b2c398a9900516b" args="() const " -->
bool&#160;</td><td class="memItemRight" valign="bottom"><b>hasDirtyGrid</b> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3c59548b10a4416e04c9d43727133867"></a><!-- doxytag: member="CGridSceneNode::regenerateMeshes" ref="a3c59548b10a4416e04c9d43727133867" args="()" -->
void&#160;</td><td class="memItemRight" valign="bottom"><b>regenerateMeshes</b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a062f57d7a7387d6e85651f97f3ab7d74"></a><!-- doxytag: member="CGridSceneNode::rebuildBoundingBox" ref="a062f57d7a7387d6e85651f97f3ab7d74" args="()" -->
void&#160;</td><td class="memItemRight" valign="bottom"><b>rebuildBoundingBox</b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1fec54ccfdcabe623288287aa606ad2e"></a><!-- doxytag: member="CGridSceneNode::rebuildSelectionMesh" ref="a1fec54ccfdcabe623288287aa606ad2e" args="()" -->
void&#160;</td><td class="memItemRight" valign="bottom"><b>rebuildSelectionMesh</b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4773a235005737a816aa927879c0ef29"></a><!-- doxytag: member="CGridSceneNode::setGridVisibilityByDistToCamera" ref="a4773a235005737a816aa927879c0ef29" args="()" -->
void&#160;</td><td class="memItemRight" valign="bottom"><b>setGridVisibilityByDistToCamera</b> ()</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Grid scene node. </p>
<p>If you need a grid on the XY or ZY axis, simply rotate this node by 90 degrees in the appropiate axis. This node creates an XZ grid by default, which should be fine for normal use. Axis Lines are a default Red and Blue for the X and Z axis respectively.</p>
<p>Please note that the internal meshbuffer used for the grid has a max size of 65535 indices.</p>
<p>Code is based on the class from here: <a href="http://irrlicht.sourceforge.net/forum/viewtopic.php?f=9&t=24938">http://irrlicht.sourceforge.net/forum/viewtopic.php?f=9&amp;t=24938</a> Thanks goes to MasterGod for helping to clean up the code and for a few bug fixes.</p>
<p>Additional thanks to: JP for optimising the rendering. Vins for fixing a nasty crash bug and optimising memory usage. </p>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a313da68bcea2307b1b79df673583f8df"></a><!-- doxytag: member="CGridSceneNode::getGridsSize" ref="a313da68bcea2307b1b79df673583f8df" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const irr::core::dimension2df &amp; <a class="el" href="class_c_grid_scene_node.html#a313da68bcea2307b1b79df673583f8df">CGridSceneNode::getGridsSize</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the size used in setGridsSize Note that individual grids can overwrite that size </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/home/hokan/NetBeansProjects/TetrisGame/headers/<a class="el" href="_c_grid_scene_node_8h_source.html">CGridSceneNode.h</a></li>
<li>/home/hokan/NetBeansProjects/TetrisGame/sources/CGridSceneNode.cpp</li>
</ul>
</div><!-- contents -->
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="class_c_grid_scene_node.html">CGridSceneNode</a>      </li>

    <li class="footer">Generated on Sun Jul 6 2014 19:35:11 for Tetris Game by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
